#ifndef SERVICELIB_H
#define SERVICELIB_H


#ifdef _WIN32
    #ifdef SERVICELIB_EXPORTS
        #define SERVICELIB_API __declspec(dllexport)
        #define EXPIMP_TEMPLATE
    #else
        #define SERVICELIB_API __declspec(dllimport)
        #define EXPIMP_TEMPLATE extern
    #endif
#else
    #define	SERVICELIB_API
    #define EXPIMP_TEMPLATE
#endif

//#include <complier.h>
//#include <PlatformStruct.h>
enum ctp_err_id
{
	NONE = 0,
	INVALID_DATA_SYNC_STATUS = 1,
	INCONSISTENT_INFORMATION = 2,
	INVALID_LOGIN = 3,
	USER_NOT_ACTIVE = 4,
	DUPLICATE_LOGIN = 5,
	NOT_LOGIN_YET = 6,
	NOT_INITED = 7,
	FRONT_NOT_ACTIVE = 8,
	NO_PRIVILEGE = 9,
	CHANGE_OTHER_PASSWORD = 10,
	USER_NOT_FOUND = 11,
	BROKER_NOT_FOUND = 12,
	INVESTOR_NOT_FOUND = 13,
	OLD_PASSWORD_MISMATCH = 14,
	BAD_FIELD = 15,
	INSTRUMENT_NOT_FOUND = 16,
	INSTRUMENT_NOT_TRADING = 17,
	NOT_EXCHANGE_PARTICIPANT = 18,
	INVESTOR_NOT_ACTIVE = 19,
	NOT_EXCHANGE_CLIENT = 20,
	NO_VALID_TRADER_AVAILABLE = 21,
	DUPLICATE_ORDER_REF = 22,
	BAD_ORDER_ACTION_FIELD = 23,
	DUPLICATE_ORDER_ACTION_REF = 24,
	ORDER_NOT_FOUND = 25,
	INSUITABLE_ORDER_STATUS = 26,
	UNSUPPORTED_FUNCTION = 27,
	NO_TRADING_RIGHT = 28,
	CLOSE_ONLY = 29,
	OVER_CLOSE_POSITION = 30,
	INSUFFICIENT_MONEY = 31,
	DUPLICATE_PK = 32,
	CANNOT_FIND_PK = 33,
	CAN_NOT_INACTIVE_BROKER = 34,
	BROKER_SYNCHRONIZING = 35,
	BROKER_SYNCHRONIZED = 36,
	SHORT_SELL = 37,
	INVALID_SETTLEMENT_REF = 38,
	CFFEX_NETWORK_ERROR = 39,
	CFFEX_OVER_REQUEST = 40,
	CFFEX_OVER_REQUEST_PER_SECOND = 41,
	SETTLEMENT_INFO_NOT_CONFIRMED = 42,
	DEPOSIT_NOT_FOUND = 43,
	EXCHANG_TRADING = 44,
	PARKEDORDER_NOT_FOUND = 45,
	PARKEDORDER_HASSENDED = 46,
	PARKEDORDER_HASDELETE = 47,
	INVALID_INVESTORIDORPASSWORD = 48,
	INVALID_LOGIN_IPADDRESS = 49,
	OVER_CLOSETODAY_POSITION = 50,
	OVER_CLOSEYESTERDAY_POSITION = 51,
	BROKER_NOT_ENOUGH_CONDORDER = 52,
	INVESTOR_NOT_ENOUGH_CONDORDER = 53,
	BROKER_NOT_SUPPORT_CONDORDER = 54,
	RESEND_ORDER_BROKERINVESTOR_NOTMATCH = 55,
	SYC_OTP_FAILED = 56,
	OTP_MISMATCH = 57,
	OTPPARAM_NOT_FOUND = 58,
	UNSUPPORTED_OTPTYPE = 59,
	SINGLEUSERSESSION_EXCEED_LIMIT = 60,
	EXCHANGE_UNSUPPORTED_ARBITRAGE = 61,
	NO_CONDITIONAL_ORDER_RIGHT = 62,
	AUTH_FAILED = 63,
	NOT_AUTHENT = 64,
	SWAPORDER_UNSUPPORTED = 65,
	LOGIN_FORBIDDEN = 66,
};
//解决:-SOLVED- Qt5.1/Qt5.2 + Mac OS 10.9 (Mavericks) + XCode 5.0.2 , Undefined symbols for architecture x86_64
/*http:\\stackoverflow.com/questions/20342896/solved-qt5-1-qt5-2-mac-os-10-9-mavericks-xcode-5-0-2-undefined-symbols*/
#endif // SERVICELIB_H
